package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("community")
public class Moment {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Integer userId;
    private String username;
    private String avatar;
    private String content;
    private String img;
    private Boolean privateFlag;
    private Integer likeCount;
    private Date createTime;

    public Moment(Long id, String content, Boolean privateFlag) {
        this.id = id;
        this.content = content;
        this.privateFlag = privateFlag;
    }

    public Moment(Long id, Integer userId, String img) {
        this.id = id;
        this.userId = userId;
        this.img = img;
    }

    public Moment(Integer userId, String content, String img, Boolean privateFlag) {
        this.userId = userId;
        this.content = content;
        this.img = img;
        this.privateFlag = privateFlag;
    }

}
